from sort_A import simply_sort

flag = True
n, k = map(int, input().split())
boxes = [list(map(int, input().split())) for i in range(n)]
for i in range(n):
    simply_sort(boxes[i])

for i in range(n):
    for j in range(k):
        if boxes[i][::-1][j] < sum(boxes[i][j : k - 1]):
            flag = False
            print("no")
    if flag:
        print("yes")
 .
